home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************/
- /* Currency.amirx */
- /* Copyright ©1998 by Dick Whiting */
- /* */
- /*------------------------------------------------------------------------*/
- /* */
- /* Calls the REBOL script for locating currency names and codes. */
- /* See the comments in currency.r for what arguments are expected. */
- /* */
- /* Note that these are mainly just playing with REBOL (www.rebol.com) */
- /* REBOL, itself, is under constant development and there is little */
- /* guarantee that these will work with the next update. */
- /* */
- /* This works with REBOL 1.0.2.1 */
- /*------------------------------------------------------------------------*/
- /* */
- /* Address Bug Reports or Comments to: */
- /* Dick Whiting <dwhiting@europa.com> */
- /* 23 Oct 1998 */
- /* */
- /* Home Page: http://www.europa.com/~dwhiting/ */
- /* */
- /**************************************************************************/
-
- pragma('STACK',40000)
- pragma('D','REBOL:')
-
- arg str
-
- Address Command 'rebol --script AMIRC:/rebol/currency.r' str 'PIPE PIPE:/currency.pipe'
-
- prefix='Currency'
- response=''
- found=0
-
- open('IN','PIPE:currency.pipe','R')
-
- do 100
- response=readln('IN')
- if response ='DONE' then break
- if response~='' then do
- parse var response "[" message "]"
- response=message
- cecho(response)
- found=1
- end
- end
-
- close('IN')
-
- if ~found then do
- response="Currency lookup failed"
- end
- cecho(response)
-
- exit
-
-
-
- cecho: /* This function echo's text to listview*/
-
- "ECHO P="d2c(27)"b«"prefix"» " arg(1)
- return 0
-
-